package com.jz.main.io.nio;

import java.util.ArrayList;
import java.util.Collection;

public class ProtoTypeTest {
    public static void main(String[] args) throws CloneNotSupportedException {
        Car car = new Car("1",new ArrayList());
        System.out.println(car);
        System.out.println(car.clone());
        System.out.println();
        Object o = new Object();

        System.out.println();
    }

}

class Car implements Cloneable{
    String name;
    Collection collection;
    Car(String s, Collection collection){
        this.name = s;
        this.collection = collection;
    }
    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}
